package cn.siat.gene.domain;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import cn.siat.common.core.annotation.Excel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * 日志对象 logs
 * 
 * @author siat
 * @date 2022-10-08
 */
@Data
@Accessors(chain = true)
@NoArgsConstructor
@AllArgsConstructor
@ToString
@TableName("logs")
public class Logs implements Serializable{
    private static final long serialVersionUID = 1L;
    /** 唯一标识 */
    @TableId(type = IdType.ASSIGN_ID)
    private String id;

    /** 关联标识 */
    @Excel(name = "关联标识")
    private String relationId;

    /** 操作人id */
    @Excel(name = "操作人id")
    private String staffId;

    /** 操作类型 */
    @Excel(name = "操作类型")
    private String operationType;

    /** 操作模块 */
    @Excel(name = "操作模块")
    private String operationModule;

    /** 操作对象来源 */
    @Excel(name = "操作对象来源")
    private String objectSource;

    /** 操作对象标识 */
    @Excel(name = "操作对象标识")
    private String objectId;

    /** 操作状态 */
    @Excel(name = "操作状态")
    private String operationState;

    /** 日志内容 */
    @Excel(name = "日志内容")
    private String operationLog;

    /** 创建员工ID */
    @Excel(name = "创建员工ID")
    private String createStaffNo;

    /** 创建员工昵称 */
    @Excel(name = "创建员工昵称")
    private String createStaffName;

    /** 创建时间 */
    @Excel(name = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone ="GMT+8")
//    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /** 修改员工ID */
    @Excel(name = "修改员工ID")
    private String updateStaffNo;

    /** 修改时间 */
    @Excel(name = "修改时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone ="GMT+8")
//    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date updateTime;
}
